Brent Yorgey

{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeFamilies #-} module CreatingSymmetry where import Control.Monad (replicateM) import Control.Monad.Random import Data.Colour.Palette.ColorSet (Brightness (..), d3Colors2) import Data.Complex import Data.List.Split (chunksOf) import Diagrams.Backend.Rasterific.CmdLine import Diagrams.Prelude type Term = (Complex Double, Int) type Params = [Term] — | Draw the parametric curve in the complex plane f(t) = \sum_{j=1}^M a_j e^{n_j i t} . drawCyclicCurve :: (TrailLike t, N t ~ Double, V t ~ V2) => Params -> t drawCyclicCurve = drawCyclicCurve’ 360 — | Draw the parametric curve in the complex plane f(t) = — \sum_{j=1}^M a_j e^{n_j i t}. The first argument controls the — number of sample points to generate. drawCyclicCurve’ :: … Continue reading Brent Yorgey